package com.zkyc.framework.website.mapper;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.zkyc.framework.common.pojo.OrganizationNew;
import com.zkyc.framework.common.pojo.Pi;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;

import java.util.List;


/**
 * (OrganizationNew)表数据库访问层
 *
 * @author libingchuan
 * @since 2022-11-09 20:19:22
 */
@Mapper
public interface OrganizationNewMapper extends BaseMapper<OrganizationNew> {

    @Select("select id from web_organization_new where organization_name = #{organizationName}")
    Integer selectId(String organizationName);

    @Select("select * from web_pi where id=#{id}")
    Pi findPiByPiId(String id);

    @Select("select pi_id from web_organization_ref_pi where organization_id=#{organizationId}")
    List<String> findPiIdByOrganizationId(Integer organizationId);

}

